public class MyStringTest {
    public static void main(String[] args) {
      String n1 ="hello java";
      String n2 ="hello java";
      n1.equals(n2);
        if (n1.equals(n2)) {
            String s = n1.replace(" ","");
            String s1 = s.replace("java","word");
            System.out.println(s1);
        }

    }

}
